package com.example.mall.domain;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.example.mall.util.CodeGenerateUtils;

import java.io.Serializable;

/**
 * <p>
 * 权限表
 * </p>
 *
 * @author whale
 * @since 2025-04-30
 */
@TableName("tb_permission")
public class Permission extends Model<Permission> {

    private static final long serialVersionUID = 1L;

    /**
     * 权限唯一标识
     */
    @TableId("permission_id")
    private Long permissionId;
    /**
     * 权限名称
     */
    @TableField("permission_name")
    private String permissionName;
    /**
     * 权限描述
     */
    @TableField("permission_description")
    private String permissionDescription;
    /**
     * 权限状态
     */
    @TableField("permission_state")
    private String permissionState;
    /**
     * 创建时间
     */
    @TableField("create_date")
    private Date createDate;
    /**
     * 修改时间
     */
    @TableField("update_date")
    private Date updateDate;

    public Permission() {
        this.permissionId = Long.valueOf(CodeGenerateUtils.generateUniqueId());
    }

    public Long getPermissionId() {
        return permissionId;
    }

    public void setPermissionId(Long permissionId) {
        this.permissionId = permissionId;
    }

    public String getPermissionName() {
        return permissionName;
    }

    public void setPermissionName(String permissionName) {
        this.permissionName = permissionName;
    }

    public String getPermissionDescription() {
        return permissionDescription;
    }

    public void setPermissionDescription(String permissionDescription) {
        this.permissionDescription = permissionDescription;
    }

    public String getPermissionState() {
        return permissionState;
    }

    public void setPermissionState(String permissionState) {
        this.permissionState = permissionState;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    @Override
    public String toString() {
        return "Permission{" +
        ", permissionId=" + permissionId +
        ", permissionName=" + permissionName +
        ", permissionDescription=" + permissionDescription +
        ", permissionState=" + permissionState +
        ", createDate=" + createDate +
        ", updateDate=" + updateDate +
        "}";
    }
}
